#include<stdio.h>

void Swap(int* num1, int *num2)
{
	int temp = *num1;
	*num1 = *num2;
	*num2 = temp;
}

void BubbleSort(int* nums, int numsSize)
{
	for (int i = 0; i < numsSize - 1; i++)
	{
		int flag = 1;
		for (int j = 0; j < numsSize - 1 - i; j++)
		{
			if (nums[j] > nums[j + 1])
			{
				Swap(&nums[j], &nums[j + 1]);
				flag = 0;
			}
		}
		if (flag)
			break;
	}
}

int main()
{
	int *nums[] = { 3,1,667,72,2,72,7,26,26, };
	int len = sizeof(nums) / sizeof(int);
	BubbleSort(nums, len);
	for (int i = 0; i < len; i++)
		printf("%d ", nums[i]);
	printf("\n");
	return 0;
}